I use a fox image and a Audrey Hepburn's image for the hybrid image experiment. First note that a good way to align two images is to align their eyes (which are the common thing between animal and human). This way you can also have the eyes from the high-frequency component to overlapping the eyss from the low-frequency component, as you can see from the hybrid image above. I would try to express image matrice to be between 0 and 1 for most parts, and adjust them to 0 ~ 255 when drawing if need. The way can avoid some debugging trouble in the filtering operations.
the cutoff is somehow sensitive. If we just use the default 20, which should not work for every graph, the low-frequency component would be hard to see in this case, as we can see below:
Without a proper alignment (aligning at the eyes as explained above), the hybrid image can be always like two overlapping images, or only see one of the images. Also, opencv uses BGR by default while plt.plot takes it as RGB image, so a conversion is needed for proper drawing. With these errors, we may get a less pretty hybrid image as below:
Summary: Here I choose to use histogram equalization. The reason is that I feel this approach looks somehow better from the exampl in lecture slides. We can observe that the image is has a higher contrast while maintaining some balance and smooth.
Summary: The left one is the original image while the right one is color-enhanced. We can see that the color is more vivid (rather than just more bright).
Summary: The left image has red shift while the right one has yellow shift. This transformation is relatively succinct to do in the LAB space. To keep it smooth without overflow/underflow, I choose a smooth function.
Bells & Whistles 1. In the followign two blocks, first we extend the hybrid function for color photos.
Summary: From the above pitcures, we can observe that colors not obvious in the high-frequency pass-filted image. The reason is that the high-frequency patterns capture the line and edge characters, and the color character should be identified in the low-frequency patterns. Hence we can expect that it's better to use color to enhance the high-frequency one. Let's check it as below:
Bells & Whistles 2
According the page 20 of https://courses.engr.illinois.edu/cs498dh/fa2011/lectures/Lecture%2004%20-%20Templates%20and%20Pyramids%20-%20CP%20Fall%202011.pdf, we have
Subsampledi = Gaussian{i - 1}.subsample() and Laplacian_i = Subsampled_i - Gaussian_i.
The Gaussian pyramid and the Laplacian pyramid are shown as below.
Bells & Whistles 3. (The three image enhancement tasks are experiemented in Part iI.)